#ifndef SPARSEVECTORADDONSFORTESTING_HPP
#define SPARSEVECTORADDONSFORTESTING_HPP

#include <MatrixCore/SparseVectorAddons.hpp>

/*!
 * Idea to use toDense() is copied from isApprox method in SparseMatrixBase,
 * Conversion is necessary as all() method is not available in SparseMatrixBase
 * TODO Understand how BinaryOperator expression returned by cwiseEqual has
 * methods of MatrixBase class like all() ?
 */
template <typename OtherDerived>
bool operator==(const SparseMatrixBase<OtherDerived>& other) const {
  return this->toDense().cwiseEqual(other.toDense()).all();
}

#endif  // SPARSEVECTORADDONSFORTESTING_HPP
